home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
- Begin VB.Form Form1
- Caption = "Form1"
- ClientHeight = 1395
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 4680
- LinkTopic = "Form1"
- ScaleHeight = 1395
- ScaleWidth = 4680
- StartUpPosition = 3 'Windows Default
- Begin VB.CommandButton Command2
- Caption = "Command2"
- Height = 495
- Left = 2400
- TabIndex = 2
- Top = 840
- Width = 1215
- End
- Begin VB.CommandButton Command1
- Caption = "Command1"
- Height = 495
- Left = 960
- TabIndex = 0
- Top = 840
- Width = 1215
- End
- Begin MSComDlg.CommonDialog CommonDialog1
- Left = 4080
- Top = 840
- _ExtentX = 847
- _ExtentY = 847
- _Version = 393216
- CancelError = -1 'True
- End
- Begin VB.Label Label1
- Caption = "Label1"
- Height = 495
- Left = 120
- TabIndex = 1
- Top = 120
- Width = 4455
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub Command1_Click()
- CommonDialog1.Flags = cdlOFNFileMustExist + cdlOFNPathMustExist
- On Error GoTo CancelPressed
- CommonDialog1.ShowOpen
- Label1.Caption = CommonDialog1.filename
- Exit Sub
- CancelPressed:
- Label1.Caption = "Cancel Pressed"
- Exit Sub
- End Sub
- Private Sub Command2_Click()
- CommonDialog1.Flags = cdlOFNOverwritePrompt + cdlOFNPathMustExist
- On Error GoTo CancelPressed
- CommonDialog1.ShowSave
- Label1.Caption = CommonDialog1.filename
- Exit Sub
- CancelPressed:
- Label1.Caption = "Cancel Pressed"
- Exit Sub
- End Sub
-